<html>
<head><meta charset="utf-8"><title>debug-unreachable · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html">debug-unreachable</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="169228830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/debug-unreachable/near/169228830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html#169228830">(Jun 28 2019 at 14:23)</a>:</h4>
<p>TIL that <code>debug_unreachable!</code> from <a href="https://github.com/mbrubeck/rust-debug-unreachable" target="_blank" title="https://github.com/mbrubeck/rust-debug-unreachable">https://github.com/mbrubeck/rust-debug-unreachable</a> is <em>very different</em> from <code>debug_assert!</code>... the latter is a NOP in release builds, the former is insta-UB!<br>
Am I the only one who finds that a weird way to name this macro?</p>



<a name="169234205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/debug-unreachable/near/169234205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html#169234205">(Jun 28 2019 at 15:25)</a>:</h4>
<p>there should be an "unsafe" in the name somewhere <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="169238968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/debug-unreachable/near/169238968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html#169238968">(Jun 28 2019 at 16:16)</a>:</h4>
<p>and that too^^</p>



<a name="169238974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/debug-unreachable/near/169238974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html#169238974">(Jun 28 2019 at 16:16)</a>:</h4>
<p>or unchecked</p>



<a name="169238984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/debug-unreachable/near/169238984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/debug-unreachable.html#169238984">(Jun 28 2019 at 16:16)</a>:</h4>
<p>like in <code>unreachable_unchecked</code> from libstd</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>